# 函数的嵌套
def func01():
    print("1111")
    def func001():
        print("222")
        return 2
    a = func001()
    return a

def func02():
    print("111")
    func01()

"""
1!+2!+...+10!
10!+...20!
累加：1+2+3...+n
阶乘:1*2*3*...n
"""
def fun1(n):
    res = 1
    i = 1
    while i <= n:
        res *= i  # res = res*i
        i += 1
    return res

def fun2(j,k):
    res1 = 0
    while j <= k:
        res1 += fun1(j)
        j += 2
    return res1

def fun03(k):
    print("递归。。。")
    if k == 1:
        return 1
    elif k == 2:
        return 2
    else:
        return fun03(k-1)+fun03(k-2)

def fun_test_01():
    print("**********")

# fun_test_01()
# print(111)

if __name__ == '__main__':
    # func01()
    #
    # print("33333")
    # result = fun2(1,20)
    # print(result)
    # fun03(3)
    fun_test_01()
    print(222)


